﻿/******************************************************************************
* File description: animationCommObject_Purify.h
* Function: 纯化动画注册到QML中用于实时数据传递的对象
* Current Version: 1.0.0
* Author: JNN
* Date: 2025-08-12
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/


#ifndef ANIMATIONCOMMOBJECT_PURIFY_H
#define ANIMATIONCOMMOBJECT_PURIFY_H

#include <QObject>
#include <QVector>
#include <QColor>

class AnimationCommObject_Purify : public QObject
{
    Q_OBJECT

public:
    AnimationCommObject_Purify();


    Q_PROPERTY(double wheelPosi                 READ readWheelPosi);
    Q_PROPERTY(double hatNum                    READ readHatNum);
    Q_PROPERTY(double pressPosi                 READ readPressPosi);
    Q_PROPERTY(double pushPosi                  READ readPushPosi);

    Q_PROPERTY(QVector<bool>    bottleHasHat       READ readBottleHasHat);
    Q_PROPERTY(QVector<double>  syringePercentage  READ readSyringePercentage);
    Q_PROPERTY(QVector<int>     syringeIsPushing   READ readSyringeIsPushing);
    Q_PROPERTY(QVector<QColor>  syringeColor       READ readSyringeColor);
    Q_PROPERTY(QVector<double>  valveAngle         READ readValveAngle);
    Q_PROPERTY(QVector<double>  syringeSpeed1      READ readSyringeSpeed1);
    Q_PROPERTY(QVector<double>  syringeSpeed2      READ readSyringeSpeed2);
    Q_PROPERTY(QVector<double>  particlePosi       READ readParticlePosi);

    Q_PROPERTY(bool   detectorGlowVisible       READ readDetectorGlowVisible);
    Q_PROPERTY(double detectorGlowAngle         READ readDetectorGlowAngle);
    Q_PROPERTY(bool   heatingState              READ readHeatingState);
    Q_PROPERTY(QVector<double> syringeHeight    READ readSyringeHeight);
    Q_PROPERTY(QVector<double> syringeWidth     READ readSyringeWidth);
    Q_PROPERTY(int gCollectContainer            READ readGCollectContainer);
    Q_PROPERTY(int pPumpState                   READ readPPumpState);

    Q_PROPERTY(QVector<QVector<double>> liquidState      READ readLiquidState);
    Q_PROPERTY(QVector<int>             liquidFlowState  READ readLiquidFlowState);



    double  readWheelPosi() const { return _wheelPosi; }
    double  readHatNum() const { return _hatNum; }
    double  readPressPosi() const { return _pressPosi; }
    double  readPushPosi() const { return _pushPosi; }

    QVector<bool> readBottleHasHat() const { return _bottleHasHat; }
    QVector<double> readSyringePercentage() const { return _syringePercentage; }
    QVector<int> readSyringeIsPushing() const { return _syringeIsPushing; }
    QVector<QColor> readSyringeColor() const { return _syringeColor; }
    QVector<double> readValveAngle() const { return _valveAngle; }
    QVector<double> readSyringeSpeed1() const { return _syringeSpeed1; }
    QVector<double> readSyringeSpeed2() const { return _syringeSpeed2; }
    QVector<double> readParticlePosi() const { return _particlePosi; }

    bool    readDetectorGlowVisible() const { return _detectorGlowVisible; }
    double  readDetectorGlowAngle()const { return _detectorGlowAngle; }
    bool    readHeatingState() const { return _heatingState; }
    QVector<double> readSyringeHeight() const { return _syringeHeight; }
    QVector<double> readSyringeWidth() const { return _syringeWidth; }
    int     readGCollectContainer() const { return _gCollectContainer; }
    int     readPPumpState() const { return _pPumpState; }

    QVector<QVector<double>>  readLiquidState() const { return _liquidState;}
    QVector<int>              readLiquidFlowState() const { return _liquidFlowState;}

public:

    // 转盘&盖盖
    double      _wheelPosi;
    double      _hatNum;
    double      _pressPosi;
    double      _pushPosi;

    QVector<bool>       _bottleHasHat;          // 瓶帽状态
    QVector<double>     _syringePercentage;     // 注射器液体
    QVector<int>        _syringeIsPushing;      // 注射器是否在推      0不动 1向下推 -1向上推
    QVector<QColor>     _syringeColor;          // 注射器颜色
    QVector<double>     _valveAngle;            // 阀门状态
    QVector<double>     _syringeSpeed1;         // 标准速率1
    QVector<double>     _syringeSpeed2;         // 标准速率2
    QVector<double>     _particlePosi;          // 色谱柱

    // 检测器
    bool                _detectorGlowVisible;
    double              _detectorGlowAngle;
    // 加热
    bool                _heatingState;
    // 注射器尺码
    QVector<double>     _syringeHeight;
    QVector<double>     _syringeWidth;
    // 用转盘还是溶靶罐
    int                 _gCollectContainer;
    // 蠕动泵状态
    int                 _pPumpState;

    // 管道液体
    QVector<QVector<double>>    _liquidState;
    // 管道液体是否在流动
    QVector<int>                _liquidFlowState;      // 3个数一组 v1 v2 state  state=0不流动 1从小数字向大数字移动 2从大数字向小数字移动

};

#endif // ANIMATIONCOMMOBJECT_PURIFY_H
